package cn.ava.org.mapper;


import cn.ava.basic.utils.PageList;
import cn.ava.org.domain.Employee;
import cn.ava.org.query.EmployeeQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface EmployeeMapper {

    // 查询所有
    List<Employee> loadAll();

    // 根据Id查询
    Employee getById(Long id);

    // 根据Id删除
    void delete(Long id);

    // 新增
    void add(Employee employee);

    // 根据Id修改
    void update(Employee employee);

    // 分页+高级查询
    List<Employee> queryData(EmployeeQuery employeeQuery);

    // 查询总条数
    Integer queryCount(EmployeeQuery employeeQuery);

    // 批量删除
    void batchDelete(Long[] id);

    // 根据用户名查询
    Employee getByUsername(String username);

    //
    void deleteEmployeeRole(Long id);

    //
    void addEmployeeRole(@Param("eId") Long id, @Param("rId") List<Long> roles);

    // 根据logininfoid查找
    Employee getByLogininfoId(Long id);
    // 根据店铺id查找
    List<Employee> getByShopId(Long id);
}
